package edu.hawaii.duedates;


/**
 * The Book Class implements the IBook interface.  A book is comprised of a title and a due date.
 * 
 * @author Ronn Reeves and Robin E. Raqueno
 */
public class Book implements IBook {
  
  /**  The book title.  */
  private String title;
  /** The due date for the book. */
  private String dueDate;
  
  
  /**
   * Creates a book object with the given title and due date.
   * 
   * @param title  The book title.
   * @param dueDate  The due date of the book.
   */
  public Book(String title, String dueDate) {
    this.title = title;
    this.dueDate = dueDate;
  }

  
  /**
   * Sets the title of this book.
   * 
   * @param title  The book title.
   */
  public void setTitle(String title) {
    this.title = title;
  }
  /**
   * Returns the title of this book.  
   *
   * @return String  The book title.
   */
  public String getTitle() {
    return this.title;
  }
  

  /**
   * Sets the due date of this book.  
   * 
   * @param  dueDate  The due date of the book.
   */
  public void setDueDate(String dueDate) {
    this.dueDate = dueDate;
  }
  /**
   * Returns the due date for this book.
   *
   * @return Date  The due date for the book.
   */
  public String getDueDate() {
    return this.dueDate;
  }

  
  /**
   * Returns the title of this book.  
   *
   * @return String  The book title.
   */
  public String toString() {
    return this.getTitle();
  }
}